Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(governor): change proposal threshold #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aahna-ashina
Copy link
Member

Reflects the parameter change at https://www.tally.xyz/gov/sector-3/proposal/88036500606289662177521211200503660601961220224900564422598757855574876854748

Related GitHub Issue

How Has This Been Tested?

Sector#3 Contribution

@codecov
Copy link

codecov bot commented Mar 19, 2023

Codecov Report

Merging #70 (0b215c7) into main (f167254) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #70   +/-   ##
=======================================
  Coverage   92.50%   92.50%           
=======================================
  Files           6        6           
  Lines         160      160           
  Branches       26       26           
=======================================
  Hits          148      148           
  Misses         12       12           
Impacted Files Coverage Δ
contracts/governance/Sector3Governor.sol 0.00% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link

@developerfred developerfred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Sector3Governor contract now directly inherits from GovernorVotes, GovernorVotesQuorumFraction, and GovernorCountingSimple.
Removed the separate inheritance of Governor and GovernorSettings from Sector3Governor, as GovernorVotes already inherits from these contracts.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";

contract Sector3Governor is GovernorVotes, GovernorVotesQuorumFraction, GovernorCountingSimple {
    constructor(IVotes _token)
        Governor("Sector#3 Governor")
        GovernorSettings(1 /* 1 block */, 50400 /* ~1 week */, 2049e15 /* 2.049 */)
        GovernorVotes(_token)
        GovernorVotesQuorumFraction(1)
    {}

    // The following functions are overrides required by Solidity.

    function proposalThreshold()
        public
        view
        override(Governor, GovernorSettings)
        returns (uint256)
    {
        return super.proposalThreshold();
    }
}

@aahna-ashina
Copy link
Member Author

@developerfred Can you do that refactoring in a separate PR? 😄

(This PR is for changing the proposal threshold.)

developerfred added a commit that referenced this pull request Mar 21, 2023
The Sector3Governor contract now directly inherits from GovernorVotes, GovernorVotesQuorumFraction, and GovernorCountingSimple.
Removed the separate inheritance of Governor and GovernorSettings from Sector3Governor, as GovernorVotes already inherits from these contracts.

ref: #70 (review)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants